public class myControllerExtension {
    public String anyVariable;
    public String anyProperty { get; set; }
 
    public myControllerExtension(ApexPages.StandardController controller) {
        anyVariable = ApexPages.currentPage().getParameters().get('AnyVariable');
    }
 
    public String anyMethod01(String value) {
        return value;
    }
 
    public PageReference anyMethod2() { 
        PageReference p = Page.aPage; 
        p.getParameters().put('Test', anyVariable);
        return p; 
    } 
 
    public String getAnyVariable() {
        return anyVariable;
    }    
 
    public void setAnyVariable(String value) {
        anyVariable = value;
    }
}